<template>
	<view class="con">
		<view class="top">
			<view class="top-title">
				<text>管理中心</text>
			</view>
			<view class="top-more" @click="goMore">
				<view class="top-more-text">
					<text>查看全部</text>
				</view>
				<view class="top-more-img">
					<image :src="goMoreImg"></image>
				</view>
			</view>
		</view>
		<view class="con-list">
			<view @click="gotoDetail(item)" class="con-box" v-for="(item,index) in conList" :key="index">
				<view class="box-img">
					<image :src="item.img"></image>
				</view>
				<view class="box-text">
					<text>{{item.text}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				goMoreImg: require('@/static/img/common/goMore_1.svg'),
				conList: [{
					id: 1,
					img: require('@/static/img/main/my/release/01.svg'),
					text: '全国代办'
				}, {
					id: 2,
					img: require('@/static/img/main/my/release/02.svg'),
					text: '万能排队'
				}, {
					id: 3,
					img: require('@/static/img/main/my/release/03.svg'),
					text: '搬家拉货'
				}, {
					id: 4,
					img: require('@/static/img/main/my/release/04.svg'),
					text: '闲置二手'
				}, {
					id: 5,
					img: require('@/static/img/main/my/release/05.svg'),
					text: '同城跑腿'
				}, {
					id: 6,
					img: require('@/static/img/main/my/release/06.svg'),
					text: '家政服务'
				}]
			}
		},
		methods: {
			goMore() {
				this.$isLoginByVisitor()
				if(!uni.getStorageSync('isVisitorLogin')){
					return
				}
				var reqData = {
					id: 0,
					text: '查看全部'
				}
				uni.navigateTo({
					url: '/subpkg/main/my/release/my-release/my-release?reqData=' + JSON.stringify(reqData)
				})
			},
			gotoDetail(item) {
				this.$isLoginByVisitor()
				if(!uni.getStorageSync('isVisitorLogin')){
					return
				}
				uni.navigateTo({
					url: '/subpkg/main/my/release/my-release/my-release?reqData=' + JSON.stringify(item)
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.con {
		width: 90%;
		margin-left: 3%;
		border-radius: 30rpx;
		background: #fff;
		padding: 2%;

		.top {
			display: flex;
			justify-content: space-between;

			.top-title {
				font-size: 36rpx;
				font-weight: 700;
				color: rgba(0, 0, 0, 1);
			}

			.top-more {
				display: flex;
				justify-content: right;

				.top-more-text {
					font-size: 24rpx;
					font-weight: 400;
					color: rgba(166, 166, 166, 1);
				}

				.top-more-img {
					image {
						width: 40rpx;
						height: 40rpx;
					}
				}
			}

		}

		.con-list {
			display: flex;
			flex-wrap: wrap;

			.con-box {
				width: 33.33%;

				.box-img {
					text-align: center;

					image {
						width: 60rpx;
						height: 60rpx;
						margin: 15rpx 0;
					}
				}

				.box-text {
					text-align: center;

					text {
						font-size: 26rpx;

					}
				}
			}
		}

	}
</style>